<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js</title>
</head>
<body>
	<!-- 端口http://192.168.4.34:9716/ -->
	<script>
		function loadName() {
			var  xmlHttp  = null;
			if (window.XMLHttpRequest){
				xmlHttp = new XMLHttpRequest();
			}else {
				xmlHttp = new ActiveXobject("Microsoft.new XMLHttpRequest");
			}
			xmlHttp.onreadystatechange = function () {
				if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
					var dataObj = JSON.parse(xmlHttp.responseText);
					var results = dataObj.RECORDS;
					for (var i = 0; i < results.length; i++) {
					 	var film = results[i];
					 	document.write("电影id=" + film.film_id +",电影标题是:" + film.title + "<br />")
						document.write("简介：" + film.description +"<br />");
						document.write("发行时间:"+ film.release_year + "<br />");
						document.write("<hr />");
					 } 

				}		
			}
			xmlHttp.open("get","film.json",true);
			xmlHttp.setRequestHeader("content-type", "application/x-www-form-urlencoded");
			xmlHttp.send("name=jack&age=11");

		}
		loadName();
	</script>
	
</body>
</html>